<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="script/jquery-1.7.2.js"></script>
    <script type="text/javascript">
        $(function () {
            //alert($(":checkbox").attr("checked"));
            //alert($(":checkbox").prop("checked"));

            //全选和全不选
            //$(":checkbox").prop("checked",false);

            //设置自定义属性
            $(":checkbox:first").attr("abc","abcValue");
        });

    </script>

</head>
<body>
<br/>
    多选：
    <input name="checkbox" type="checkbox" checked="checked" value="checkbox1" />checkbox1
    <input name="checkbox" type="checkbox" value="checkbox2" />checkbox2
    <br/><br/>
    <div>1234</div>
    <div>1234</div>
</body>
</html>